package cc.wsyw126.java.lambda;



/**
 * Created by junpeng.yang on 16/8/23.
 */
public class Converter {
    public static void main(String[] args) {
        IConverter<String, Integer> converter = Integer::valueOf;
        Integer integer = converter.convert("123");
        System.out.println("integer = " + integer);

        int num =1;
        IConverter<Integer, String> stringIConverter = from -> String.valueOf(from + num);
        System.out.println(stringIConverter.convert(3));
    }
}
